package makabakaquestionnaire.zutsoftware.system.service.Impl;

import makabakaquestionnaire.zutsoftware.system.entity.CourseProject;
import makabakaquestionnaire.zutsoftware.system.mapper.CourseProjectMapper;
import makabakaquestionnaire.zutsoftware.system.service.ICourseProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 课程问卷关联Service业务层处理
 *
 * @author ruoyi
 * @date 2022-04-23
 */
@Service
public class CourseProjectServiceImpl implements ICourseProjectService
{
    @Autowired
    private CourseProjectMapper courseProjectMapper;

    /**
     * 查询课程问卷关联
     *
     * @param courseId 课程问卷关联主键
     * @return 课程问卷关联
     */
    @Override
    public List<CourseProject> selectCourseProjectByCourseId(Long courseId)
    {
        return courseProjectMapper.selectCourseProjectByCourseId(courseId);
    }

    /**
     * 查询课程问卷关联列表
     *
     * @param courseProject 课程问卷关联
     * @return 课程问卷关联
     */
    @Override
    public List<CourseProject> selectCourseProjectList(CourseProject courseProject)
    {
        return courseProjectMapper.selectCourseProjectList(courseProject);
    }

    /**
     * 新增课程问卷关联
     *
     * @param courseProject 课程问卷关联
     * @return 结果
     */
    @Override
    public int insertCourseProject(CourseProject courseProject)
    {
        return courseProjectMapper.insertCourseProject(courseProject);
    }

    /**
     * 修改课程问卷关联
     *
     * @param courseProject 课程问卷关联
     * @return 结果
     */
    @Override
    public int updateCourseProject(CourseProject courseProject)
    {
        return courseProjectMapper.updateCourseProject(courseProject);
    }

    /**
     * 批量删除课程问卷关联
     *
     * @param courseIds 需要删除的课程问卷关联主键
     * @return 结果
     */
    @Override
    public int deleteCourseProjectByCourseIds(Long[] courseIds)
    {
        return courseProjectMapper.deleteCourseProjectByCourseIds(courseIds);
    }

    /**
     * 删除课程问卷关联信息
     *
     * @param courseId 课程问卷关联主键
     * @return 结果
     */
    @Override
    public int deleteCourseProjectByCourseId(Long courseId)
    {
        return courseProjectMapper.deleteCourseProjectByCourseId(courseId);
    }
}
